function makeOverviewImgs(dataset_name)
% Possible dataset names:
% SANDBOX_RUN1  = Original dataset labeled by WashU ppl. 11 cameras
% SANDBOX_RUN2  = 2nd dataset labeled by WashU ppl. 39 cameras
% LIVE_MTURK    = Results from live run
% ITER_DATA     = Iterative data from Abby
% SPECIAL_ITER = Iterative with random negative examples
load_settings;

% data = dataset_name;
disp(['Generating overview images for dataset ' dataset_name]);
data = getData(dataset_name);
for ix = 1:size(data,1)
    for jx = 1:size(data,2)
        if data(ix,jx).cam_id > 0 % if image exists
            disp(['Generating overview image for camera '  num2str(data(ix,jx).cam_id) ', image: ' data(ix,jx).filename]);
            img = imread([image_root sprintf('%08d', data(ix,jx).cam_id) '/' data(ix,jx).filename]);
            out_file = [overview_root 'data/' dataset_name '/' sprintf('%08d', data(ix,jx).cam_id) '_' data(ix,jx).filename];
            imshow(img);
            title(out_file);
            hold on;
            for kx = 1:size(data(ix,jx).ppl_rects, 1)
                rectangle('Position', data(ix,jx).ppl_rects(kx,:), 'EdgeColor', 'g');
            end
            for kx = 1:size(data(ix,jx).bg_rects, 1)
                rectangle('Position', data(ix,jx).bg_rects(kx,:), 'EdgeColor', 'r');
            end
            hold off;
%             pause();
            pause(1);
            f=getframe(gca);
            [X, map] = frame2im(f);
            pause(2);
            imwrite(X, out_file, 'jpeg');
            pause(2); 
        end
    end
end